package com.erp.erp_entitys.Blueprint;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author xumingbo
 * 图纸产品表
 */
@ApiModel(value = "图纸产品实体类")
public class BlueprintProductEntity implements Serializable {
    /**
     * 主键
     */
    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 图纸外键
     */
    @ApiModelProperty(value = "blueprintId")
    private Integer blueprintId;

    /**
     * 产品编号
     */
    @ApiModelProperty(value = "产品编号")
    private String productNo;

    /**
     * 规格编号
     */
    @ApiModelProperty(value = "规格编号")
    private String specNo;

    /**
     * 规格说明
     */
    @ApiModelProperty(value = "规格说明")
    private String normExplain;

    /**
     * 中文名称
     */
    @ApiModelProperty(value = "中文名称")
    private String chineseName;

    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称")
    private String englishName;

    /**
     * 中文描述
     */
    @ApiModelProperty(value = "中文描述")
    private String chineseDesc;

    /**
     * 英文描述
     */
    @ApiModelProperty(value = "英文描述")
    private String englishDesc;

    /**
     * 单位
     */
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 颜色
     */
    @ApiModelProperty(value = "颜色")
    private String colour;

    /**
     * 客户货号
     */
    @ApiModelProperty(value = "客户货号")
    private String customerArticleNo;

    /**
     * 图片
     */
    @ApiModelProperty(value = "图片")
    private String img;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getBlueprintId() {
        return blueprintId;
    }

    public void setBlueprintId(Integer blueprintId) {
        this.blueprintId = blueprintId;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo == null ? null : productNo.trim();
    }

    public String getSpecNo() {
        return specNo;
    }

    public void setSpecNo(String specNo) {
        this.specNo = specNo == null ? null : specNo.trim();
    }

    public String getNormExplain() {
        return normExplain;
    }

    public void setNormExplain(String normExplain) {
        this.normExplain = normExplain == null ? null : normExplain.trim();
    }

    public String getChineseName() {
        return chineseName;
    }

    public void setChineseName(String chineseName) {
        this.chineseName = chineseName == null ? null : chineseName.trim();
    }

    public String getEnglishName() {
        return englishName;
    }

    public void setEnglishName(String englishName) {
        this.englishName = englishName == null ? null : englishName.trim();
    }

    public String getChineseDesc() {
        return chineseDesc;
    }

    public void setChineseDesc(String chineseDesc) {
        this.chineseDesc = chineseDesc == null ? null : chineseDesc.trim();
    }

    public String getEnglishDesc() {
        return englishDesc;
    }

    public void setEnglishDesc(String englishDesc) {
        this.englishDesc = englishDesc == null ? null : englishDesc.trim();
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit == null ? null : unit.trim();
    }

    public String getColour() {
        return colour;
    }

    public void setColour(String colour) {
        this.colour = colour == null ? null : colour.trim();
    }

    public String getCustomerArticleNo() {
        return customerArticleNo;
    }

    public void setCustomerArticleNo(String customerArticleNo) {
        this.customerArticleNo = customerArticleNo == null ? null : customerArticleNo.trim();
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BlueprintProductEntity that = (BlueprintProductEntity) o;
        return id.equals(that.id) &&
                blueprintId.equals(that.blueprintId) &&
                Objects.equals(productNo, that.productNo) &&
                Objects.equals(specNo, that.specNo) &&
                Objects.equals(normExplain, that.normExplain) &&
                Objects.equals(chineseName, that.chineseName) &&
                Objects.equals(englishName, that.englishName) &&
                Objects.equals(chineseDesc, that.chineseDesc) &&
                Objects.equals(englishDesc, that.englishDesc) &&
                Objects.equals(unit, that.unit) &&
                Objects.equals(colour, that.colour) &&
                Objects.equals(customerArticleNo, that.customerArticleNo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, blueprintId, productNo, specNo, normExplain, chineseName, englishName, chineseDesc, englishDesc, unit, colour, customerArticleNo);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append(" \"id\":").append(id);
        sb.append(", \"blueprintId\":").append(blueprintId);
        sb.append(", \"productNo\":\"").append(productNo).append('\"');
        sb.append(", \"specNo\":\"").append(specNo).append('\"');
        sb.append(", \"normExplain\":\"").append(normExplain).append('\"');
        sb.append(", \"chineseName\":\"").append(chineseName).append('\"');
        sb.append(", \"englishName\":\"").append(englishName).append('\"');
        sb.append(", \"chineseDesc\":\"").append(chineseDesc).append('\"');
        sb.append(", \"englishDesc\":\"").append(englishDesc).append('\"');
        sb.append(", \"unit\":\"").append(unit).append('\"');
        sb.append(", \"colour\":\"").append(colour).append('\"');
        sb.append(", \"customerArticleNo\":\"").append(customerArticleNo).append('\"');
        sb.append(", \"img\":\"").append(img).append('\"');
        sb.append('}');
        return sb.toString();
    }
}